Conventionally, an optical sensor that includes a light emitting element and a light receiving element is used to measure various physical quantities based on the output signal of the light receiving element. Japanese National Phase Laid-Open Patent Publications No. 2012-508631 and No. 2011-513038 describe using optical sensors to obtain biological signals for measuring a local blood oxygen concentration (arterial blood oxygen saturation: SpO2), a pulse wave (PPG), or the like.